//创建store实例对象
import {observable,action} from 'mobx-miniprogram'
export const store=observable({
    //属性
    numA:1,
    numB:2,
    //计算属性
    get sum(){
        return this.numA+this.numB
    },
    //action函数，修改store属性值
    upNum1:action(function(step){
        this.numA+=step
    }),
    upNum2:action(function(step){
        this.numB+=step
    })
})